<template>
  <el-container class="layout-container-demo">
    <Header />
    <Main></Main>
  </el-container>
</template>

<script lang="ts" setup>
import Header from "../Header/Header.vue";
import Main from "@/view/Main/Main.vue";
</script>

<script lang="ts">
import {verifyToken} from '@/api/login'
export default  {
  async beforeRouteEnter(to,from,next) {
    let result = await verifyToken()
    if (result.data.isLogin) next()
  }
}

</script>

<style scoped lang="less">
.layout-container-demo {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
</style>
